<div class="content-byc image-content" ng-controller="vmUpdateVmwareCtrl">
    <div class="animated update-content" ng-class="{true:'bounceInRight',false:'bounceOutRight'}[isActive]"
         ng-if="showDetail==1">
        <div class="wrapper-md">
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default" style="padding:0;">
                        <div class="panel-heading">
                            <span class="p-l-6">编辑虚机</span>
                            <button class="btn btn-default pull-right" style="margin-top: -7px;" ng-click="goBack()" tabindex="0">
                                <i class="fa fa-reply icon-font"></i> 返回
                            </button>
                        </div>

                        <div class="panel-body pmb-block" style="border:none;">
                            <div class="form-horizontal">
                                <div class="col-md-12 margin-top-12">
                                    <form class="form-horizontal form-validation" name="addvmVmwareForm">
                                        <div class="form-group">
                                            <div class="col-lg-6">
                                                <label class="col-md-3 control-label control-label2"><span class="span-red">*</span>虚机名称：</label>
                                                <div class="col-md-9 control-input width-74">
                                                    <input type="text" name="name" class="form-control" placeholder="虚机名称" ng-model="addData.name" disabled>
                                                </div>
                                            </div>
                                            <div class="col-lg-6">
                                                <label class="col-md-3 control-label control-label2"><span class="span-red">*</span>虚机模板：</label>
                                                <div class="col-md-9 control-input width-74">
                                                    <input type="text" name="template" class="form-control"  placeholder="虚机模板" ng-model="addData.template" disabled>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-lg-6">
                                                <label class="col-md-3 control-label control-label2"><span class="span-red">*</span>目标主机：</label>
                                                <div class="col-md-9 control-input width-74">
                                                    <input type="text" name="name" class="form-control" placeholder="目标主机" ng-model="addData.hostName" disabled>
                                                </div>
                                            </div>
                                            <div class="col-lg-6">
                                                <label class="col-md-3 control-label control-label2"><span class="span-red">*</span>数据存储：</label>
                                                <div class="col-md-9 control-input width-74">
                                                    <input type="text" name="name" class="form-control" placeholder="数据存储" ng-model="addData.datastores" disabled>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-lg-12">
                                                <label class="col-md-3 control-label control-label2">存储资源：</label>
                                                <div class="col-md-9 control-input width-74" style="width:calc(100% - 110px);border: 1px solid #ddd;margin: 0 15px;">
                                                    <div class="search-content1">
                                                        <div class="form-group">
                                                            <div class="col-lg-6" style="margin-top:10px;">
                                                                <label class="col-lg-3 control-label control-label2" style="margin-left: 0px;"><span class="span-red">*</span>cpu大小：</label>
                                                                <div class="col-lg-8 control-input" style="padding: 0;">
                                                                    <input type="text" name="cpu" class="form-control" ng-model="addData.cpu" validator="required,positiveNumber" ng-change="check(0,addData.cpu,0,32)">
                                                                </div>
                                                                <div class="col-lg-1" style="margin-left: -10px;"><span class="sup" style="">核</span></div>
                                                            </div>
                                                            <div class="col-lg-6" style="margin-top:10px;">
                                                                <label class="col-lg-3 control-label control-label2" style="margin-left: 0px;"><span class="span-red">*</span>内存大小：</label>
                                                                <div class="col-lg-8 control-input" style="padding: 0;">
                                                                    <input type="text" name="memory" class="form-control" ng-model="addData.memory" validator="required,positiveNumber" ng-change="check(1,addData.memory,0,32768)">
                                                                </div>
                                                                <div class="col-lg-1" style="margin-left: -10px;"><span class="sup" style="">MB</span></div>
                                                            </div>
                                                        </div>
                                                        <div class="form-group">
                                                            <div class="col-lg-6" style="margin-top:10px;">
                                                                <label class="col-lg-3 control-label control-label2" style="margin-left: 0px;"><span class="span-red">*</span>磁盘大小：</label>
                                                                <div class="col-lg-8 control-input" style="padding: 0;">
                                                                    <input type="text" name="disk" class="form-control" ng-model="addData.disk"  disabled>
                                                                </div>
                                                                <div class="col-lg-1" style="margin-left: -10px;"><span class="sup" style="">G</span></div>
                                                            </div>
                                                            <div class="col-lg-6" style="margin-top:10px;">
                                                                <label class="col-lg-3 control-label control-label2" style="margin-left: 0px;">新增磁盘：</label>
                                                                <div class="col-lg-4 control-input" style="padding: 0;">
                                                                    <input type="text" name="extendDisk" class="form-control" ng-model="addData.extendDisk" validator="positiveNumber_opt" maxlength="4" ng-blur="checkDisk()">
                                                                </div>
                                                                <div class="col-lg-4 control-input" ng-if="addData.extendDisk">
                                                                    <select class="form-control" name="datastore" ng-model="addData.datastore" validator="required" ng-change="checkDisk(1)">
                                                                        <option value="">--请选择--</option>
                                                                        <option ng-repeat="row in datastoreList" ng-selected="row.name==addData.datastore"  value="{{row.name}}" ng-bind="row.name"></option>
                                                                    </select>
                                                                </div>
                                                                <div class="col-lg-4 control-input" ng-if="!addData.extendDisk">
                                                                    <select class="form-control" name="datastore" ng-model="addData.datastore" ng-change="checkDisk(1)">
                                                                        <option value="">--请选择--</option>
                                                                        <option ng-repeat="row in datastoreList" ng-selected="row.name==addData.datastore" value="{{row.name}}" ng-bind="row.name"></option>
                                                                    </select>
                                                                </div>
                                                                <div class="col-lg-1" style="margin-left: -10px;"><span class="sup" style="">G</span></div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-lg-12">
                                                <label class="col-md-3 control-label control-label2">网络设备：</label>
                                                <div class="col-md-9 control-input width-74"
                                                     style="width:calc(100% - 110px);border: 1px solid #ddd;margin: 0 15px;">
                                                    <div class="search-content1 vm-network">
                                                        <div class="col-lg-12 margin-10" style="padding-left:10px;margin-top:12px;">
                                                            <div class="region region-box region-active  vm-network-region" ng-repeat="row in selectNetworkListData">
                                                                <span class="region-txt" ng-class="{'REMOVE':'line-through'}[row.operation]" >{{row.disLabel+' '+row.name}}</span>
                                                                <span class="text-warning-dk" ng-if="row.operation != 'NORMAL'" >({{operationStatus[row.operation]}})</span>
                                                                <span style="cursor: pointer">
																		<i class="fa fa-pencil" ng-if="row.operation != 'REMOVE'" ng-click="operateNetwork(row,$index)"></i>
																		<i class="fa fa-trash-o" ng-if="row.operation != 'REMOVE'" ng-click="delNetwork(row,$index)"></i>
																		<i class="fa fa-mail-reply" ng-if="row.operation == 'REMOVE'" ng-click="recoveryNetwork(row)"></i></span>
                                                            </div>
                                                            <div class="region region-box region-active" style="width:110px;cursor: pointer" ng-click="operateNetwork()"><i class="fa fa-plus"></i> 新增 </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                    <div class="col-md-12" style="margin:10px 0;">
                                        <div class="col-md-6"><button type="submit" class="btn btn-info" style="width:95%;height:35px;margin-bottom:15px;" validation-submit="addvmVmwareForm" ng-disabled="addvmVmwareForm.$invalid||isLoadingActive" ng-click="ok()">提交</button></div>
                                        <div class="col-md-6"><button class="btn btn-cancel" style="width:95%;height:35px;margin-bottom:15px;" ng-click="cancel()">取消</button></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>